package com.example.democlient.network.serverpackets;

import java.nio.ByteBuffer;

import com.example.democlient.network.ServerConnection;
import com.example.democlient.network.packet.ServerPacket;

/**
 * 向服务器发送
 * @author Administrator
 *
 */
public class SM_ADDRESS_CREATE_REQUEST extends ServerPacket
{

	private final int districtId;
	private final String address;
	private final double xaxis;
	private final double yaxis;
	public SM_ADDRESS_CREATE_REQUEST(int districtId,String address,double xaxis,double yaxis)
	{
		super(0x05);
		this.districtId = districtId;
		this.address=address;
		this.xaxis = xaxis;
		this.yaxis = yaxis;
	}

	@Override
	protected void writeImpl(ServerConnection con, ByteBuffer buf)
	{
		writeD(buf,districtId);
		writeS(buf,address);
		writeDF(buf,xaxis);
		writeDF(buf,yaxis);
	}
}
